<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../bootstrap-4.6.1-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="../bootstrap-4.6.1-dist/js/jquery.min.js"></script>
    <script src="../bootstrap-4.6.1-dist/js/bootstrap.min.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    th {
        border-right: 1px solid;
        border-left: 1px solid;
    }
</style>

<body>
    <div class="container-fluid">
        <div class="row" style="width: 100%;height: 50px;">
            <div class=" col-md-4 row">
                <div class="  m-3 p-2 r-3">
                    收藏内容
                </div>
                <div>
                    <input type="text" class="rounded-pill m-3 p-2">
                </div>
                <div>
                    <button class="rounded-pill p-2 m-3 bg-info">
                        <span class="glyphicon glyphicon-search"></span> 查询
                    </button>
                </div>
            </div>
            <div class="col-md-2   offset-6 ">
                <button class="bg-danger m-3 p-2 rounded-pill ">
                    <span class="glyphicon glyphicon-trash m-2"></span>
                    删除
                </button>
            </div>
        </div>
        <!-- <div class="row p-4 " style="background-color: #746666;">
        <div class="col-sm-2 ">
          索引
        </div>
        <div class="col-sm-6 text-center">
             收藏名称
        </div>
        <div class="col-sm-2">
           收藏图片
        </div>
        <div class="col-sm-2">
          操作
        </div> -->
        <table class="table table-bordered table-striped table-hover text-center">
            <thead>
                <tr style="background-color: #746666;">
                    <th><input type="checkbox"></th>
                    <th>索引</th>
                    <th class="col-8" style="text-align: center;">收藏名称</th>
                    <th class="col-1">收藏图片</th>
                    <th class="col-2">操作</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
    <script>
        $(function () {
            var settings = {
                "url": "http://150.158.55.119/readydesk-restServer/service/management/tables/yuanrongshuai_gexq/query?size=100",
                "method": "GET",
                "timeout": 0,
                "headers": {
                    "Authorization": "Bearer b6253001e6e540428142ab4a7e75bfe1",
                    "Accept": "*/*",
                },
            };
            $.ajax(settings).done(function (response) {
                for (let i = 0; i < response.data.length; i++) {
                    var str = `<tr>
        <td style="line-height:74px"><input type="checkbox" name="" id="${response.data[i].ID}"></td>
                <td style="line-height:74px">${response.data[i].ID}</td>
                <td style="line-height:74px">${response.data[i].NAME}</td>
                <td style="line-height:74px">${response.data[i].IMG}</td>
                <td>
                     <button class="bg-primary m-3 p-2  rounded-pill ">
        <span class="glyphicon glyphicon-file "></span>
        详细
    </button>
    <button class="bg-danger m-3 p-2 rounded-pill ">
        <span class="glyphicon glyphicon-trash m-2"></span>
        删除
    </button>
    </td>
                </tr>`
                    $("tbody").append(str)
                    // tb.append(str)  
                }
            });
        })
    </script>
</body>

</html>